package com.ruoyi.storage.domain;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName repo_rk
 */
@TableName(value ="repo_rk")
@Data
public class RepoRk implements Serializable {
    /**
     * 入库信息的id（自增）
     */
    @TableId(type = IdType.AUTO)
    private Integer rkId;

    /**
     * 采购单编号
     */
    private String poPurIndent;

    /**
     * 金额
     */
    @TableField(exist = false)
    private String money;

    /**
     * 仓库管理表的id
     */
    private Integer repoWareId;

    /**
     * 仓库名称
     */
    @TableField(exist = false)
    private String wareName;

    /**
     * 入库时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date rkTime;

    /**
     * 入库人（登录人的id）
     */
    @TableField(fill = FieldFill.INSERT)
    private Integer sysRkUserId;

    /**
     * 入库人名字
     */
    @TableField(exist = false)
    private String rkName;

    /**
     * 状态(0未入库,1已入库)
     */
    private String reStatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        RepoRk other = (RepoRk) that;
        return (this.getRkId() == null ? other.getRkId() == null : this.getRkId().equals(other.getRkId()))
            && (this.getPoPurIndent() == null ? other.getPoPurIndent() == null : this.getPoPurIndent().equals(other.getPoPurIndent()))
            && (this.getRepoWareId() == null ? other.getRepoWareId() == null : this.getRepoWareId().equals(other.getRepoWareId()))
            && (this.getRkTime() == null ? other.getRkTime() == null : this.getRkTime().equals(other.getRkTime()))
            && (this.getSysRkUserId() == null ? other.getSysRkUserId() == null : this.getSysRkUserId().equals(other.getSysRkUserId()))
            && (this.getReStatus() == null ? other.getReStatus() == null : this.getReStatus().equals(other.getReStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRkId() == null) ? 0 : getRkId().hashCode());
        result = prime * result + ((getPoPurIndent() == null) ? 0 : getPoPurIndent().hashCode());
        result = prime * result + ((getRepoWareId() == null) ? 0 : getRepoWareId().hashCode());
        result = prime * result + ((getRkTime() == null) ? 0 : getRkTime().hashCode());
        result = prime * result + ((getSysRkUserId() == null) ? 0 : getSysRkUserId().hashCode());
        result = prime * result + ((getReStatus() == null) ? 0 : getReStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", rkId=").append(rkId);
        sb.append(", poPurIndent=").append(poPurIndent);
        sb.append(", repoWareId=").append(repoWareId);
        sb.append(", rkTime=").append(rkTime);
        sb.append(", sysRkUserId=").append(sysRkUserId);
        sb.append(", status=").append(reStatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}